package com.huang.design.creatation.Factory.SimpleFactory;

public class WLFactory {


    public AbstractCar  newCar(String name){
        //简单工厂  太多车 if判断多
        if("Van".equals(name)){
            return new VanCar();
        }else
        if("Min".equals(name)){
            return new MinCar();
        }
        return null;
    }
}
